home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / CGIPERL / MACPERL / MSRCE418.HQX / Perl Source ƒ / MacPerl / MPAppleEvents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-27  |  3.0 KB  |  112 lines

  1. /*********************************************************************
  2. Project    :    MacPerl                    -    Real Perl Application
  3. File        :    MPAppleEvents.h    -
  4. Author    :    Matthias Neeracher
  5.  
  6. A lot of this code is borrowed from 7Edit written by
  7. Apple Developer Support UK
  8.  
  9. Language    :    MPW C
  10.  
  11. $Log: MPAppleEvents.h,v $
  12. Revision 1.1  1994/02/27  23:02:47  neeri
  13. Initial revision
  14.  
  15. Revision 0.3  1993/08/28  00:00:00  neeri
  16. IssueFormatCommand
  17.  
  18. Revision 0.2  1993/05/30  00:00:00  neeri
  19. Support Console Windows
  20.  
  21. Revision 0.1  1993/05/29  00:00:00  neeri
  22. Compiles correctly
  23.  
  24. *********************************************************************/
  25.  
  26. #ifndef __MPAPPLEEVENTS__
  27. #define __MPAPPLEEVENTS__
  28.  
  29. #include <Types.h>
  30. #include <QuickDraw.h>
  31. #include <Packages.h>
  32. #include <GestaltEqu.h>
  33. #include <Editions.h>
  34. #include <Printing.h>
  35. #include <AppleEvents.h>
  36. #include <Processes.h>
  37.  
  38. #ifndef __MPGLOBALS__
  39. #include <MPGlobals.h>
  40. #endif
  41.  
  42. enum {
  43.  
  44. ETX = 0x03, /* Enter key on keyboard or keypad */
  45. BS  = 0x08, /* Backspace key on keyboard       */
  46. HT  = 0x09, /* Tab key on keyboard             */
  47. CR  = 0x0D, /* Return key on keyboard          */
  48. ESC = 0x1B, /* Clear key on keypad             */
  49. FS  = 0x1C, /* Left arrow key on keypad        */
  50. GS  = 0x1D, /* Right arrow key on keypad       */
  51. RS  = 0x1E, /* Up arrow key on keypad          */
  52. US  = 0x1F  /* Down arrow key on keypad        */
  53. };
  54.  
  55. pascal Boolean AllSelected(TEHandle te);
  56. pascal void InitAppleEvents(void);
  57. pascal void DoAppleEvent(EventRecord theEvent);
  58.  
  59. #ifndef RUNTIME
  60. pascal OSErr MakeSelfAddress(AEAddressDesc *selfAddress);
  61. pascal OSErr MakeSelfPSN(ProcessSerialNumber *selfPSN);
  62. #endif
  63.  
  64. /*
  65.     Text Commands
  66. */
  67. pascal void IssueCutCommand(DPtr theDocument);
  68. pascal void IssueCopyCommand(DPtr theDocument);
  69. pascal void IssuePasteCommand(DPtr theDocument);
  70. pascal void IssueClearCommand(DPtr theDocument);
  71. pascal void IssueFormatCommand(DPtr theDocument);
  72.  
  73. /*
  74.     Window Commands
  75. */
  76.  
  77. pascal void IssueZoomCommand(WindowPtr whichWindow, short whichPart);
  78. pascal void IssueCloseCommand(WindowPtr whichWindow);
  79. pascal void IssueSizeWindow(WindowPtr whichWindow, short newHSize,short newVSize);
  80. pascal void IssueMoveWindow(WindowPtr whichWindow, Rect sizeRect);
  81. pascal void IssuePageSetupWindow(WindowPtr whichWindow, TPrint thePageSetup);
  82. pascal void IssueShowBorders(WindowPtr whichWindow, Boolean showBorders);
  83. pascal void IssuePrintWindow(WindowPtr whichWindow);
  84.  
  85. /*
  86.     Document Commands
  87. */
  88.  
  89. pascal OSErr IssueJumpCommand(FSSpec * file, WindowPtr win, short line);
  90. pascal OSErr IssueAEOpenDoc(FSSpec myFSSpec);
  91. pascal void  IssueAENewWindow(void);
  92. pascal OSErr IssueSaveCommand(DPtr theDocument, FSSpecPtr where);
  93.  
  94. pascal OSErr IssueRevertCommand(WindowPtr theWindow);
  95. pascal OSErr IssueQuitCommand(void);
  96.  
  97. #ifndef RUNTIME
  98. pascal void IssueCreatePublisher(DPtr whichDoc);
  99. #endif
  100.  
  101. pascal void EnforceMemory(DPtr theDocument, TEHandle theHTE);
  102.  
  103. #ifndef RUNTIME
  104. /*
  105.     Recording of Keystrokes
  106. */
  107.  
  108. pascal void AddKeyToTypingBuffer(DPtr theDocument, char theKey);
  109. pascal void FlushAndRecordTypingBuffer(void);
  110. #endif
  111.  
  112. #endif